import * as type from './type'

const state = {
    homelist:null
}

export const actionCreators = {
    get_homelist(){
        return dispatch => {
            axios({
                url:'/api/getGoods',
                params:{
                    page: 1,
                    zy_ids: 'p8_c4_l4',
                    app_name: 'zhe',
                    catname: 'tab_hpzc',
                    flag: 'tab_hpzc'
                }
            }).then(data => console.log(data))
              .catch(error => console.log(error))
        }
    }
}

export  const reducer =( prevState = state , action ) => {
    const newState = {
        ...prevState
    }
    switch (action.type) {
        case type.GET_HOMELIST:
            
            break;
    
        default:
            break;
    }
    return newState
}